package com.hioove.test.controller;

import com.hioove.core.annotation.Autowired;
import com.hioove.core.annotation.RequestMapping;
import com.hioove.core.annotation.RequestParam;
import com.hioove.core.annotation.RestController;
import com.hioove.test.service.IndexService;

import java.util.*;


@RestController("/")
public class IndexController {
    @Autowired
    private IndexService indexService;


    @Autowired
    private IndexService indexService0;

    @RequestMapping("/test")
    public Map say() {
        System.out.println("i am indexController");

        return indexService.say();
    }

    @RequestMapping("/test1")
    public Object say1(String a, String b, String c) {
        System.out.println("i am indexController");
        indexService.say();
        return new Object();
    }

    @RequestMapping("/test2")
    public Map<String, String> say2(HashMap map) {
        System.out.println("i am indexController");
        indexService.say();
        return new HashMap<>();
    }

    @RequestMapping("/test3")
    public List<?> say3(@RequestParam String a) {
        System.out.println("i am indexController");
        indexService.say();
        return Arrays.asList(11);
    }

    @RequestMapping("/test4")
    public IndexController say4() {
        System.out.println("i am indexController");
        indexService.say();
        return new IndexController();
    }

    @RequestMapping("/test5")
    public IndexController say5(Map map) {
        System.out.println(map);
        System.out.println("i am indexController");
        indexService.say();
        return new IndexController();
    }
}

